#define _CRT_SECURE_NO_WARNINGS 1

#include "Queue.h"
#include "Stack.h"

void TestStack1()
{
    Stack st;
    StackInit(&st);
    StackPush(&st, 1);
    StackPush(&st, 2);
    StackPush(&st, 3);
    StackPush(&st, 4);
    StackPush(&st, 5);

    while (!StackEmpty(&st))
    {
        printf("%d ", StackTop(&st));
        StackPop(&st);
    }
    printf("\n");

    StackDestroy(&st);
}

void TestQueue1()
{
    Queue pq;
    QueueInit(&pq);
    QueuePush(&pq, 5);
    QueuePush(&pq, 4);
    QueuePush(&pq, 3);
    QueuePush(&pq, 2);
    QueuePush(&pq, 1);


    while (!QueueEmpty(&pq))
    {
        printf("%d ", QueueFront(&pq));
        QueuePop(&pq);
    }
    printf("\n");

    QueueDestroy(&pq);
}



int main()
{
    TestStack1();
    TestQueue1();

    return 0;
}